#ifndef __SCENEDECORATIONPANEL_H__
#define __SCENEDECORATIONPANEL_H__

#include <stl/list.h>
#include <stl/string.h>
#include "workbasepanel.h"

class CSceneDecorationPanel: public CWorkBasePanel{
public:
    static CSceneDecorationPanel* GetInterface();
    CSceneDecorationPanel( float fLeft, float fTop, float fWidth, float fHeight );
    virtual ~CSceneDecorationPanel();
    virtual void Init();
    virtual void Final();
    virtual int32 Update( int32 nDelta, float fDelta );
    virtual int32 Render();
    virtual void Enter();
    virtual void Leave();
    struct SSceneObjectConfigInfo* GetSelectedFileInfo();
    int32 GetBrushSize(){ return m_nSelectBrushSize; }
    int32 GetBrushType(){ return m_nSelectBrushShapeType; }

private:
    virtual void OnClick( CUIElement *pSelf );
    virtual void OnSelected( CUIElement* pSelf, int32 nType, int32 nIndex );
    void _Reload();
    void OnNotification_UpdateUIControl_Event( int32 w, int32 l, void* pData );
    void OnClass0( int32 nIndex );
    void OnClass1( int32 nIndex );
    void UpdateListViewData( int32 nClass0, int32 nClass1 );
    void OnReload();
    void OnPreviewedNewFile( const char* strFileName, class CGameObject* pGameObject );
    void OnPreviewAnimationSelect( int32 nAnimationIndex );

private:
    const char* m_strResourceSpace;
    class CSceneObjectConfigManager* m_pSceneObjectCfgMgr;

    CButton* m_pObjectClass0Btn;
    CButton* m_pObjectClass1Btn;
    CListView* m_pObjectListView;

    CLable* m_pBrushSizeLB;
    CIconButton* m_vBrushSizeList[ 5 ];
    int32 m_nSelectBrushSize;

    CLable* m_pBrushShapeLB;
    CIconButton* m_vBrushShapeList[ 2 ];
    int32 m_nSelectBrushShapeType;
    
    list< string32 > m_vAnimationNameList;
    CButton* m_pAnimationBtn;
    class CPreviewCanvas* m_pPreviewCanvas;
};

#endif